package com.ptc.ims.shared;

import java.io.Serializable;

@SuppressWarnings("serial")
public class Product 
implements Serializable
{
	private Double price;
	private String name;
	private String id;

	public Product() 
	{
	}

	public Product(String id, String name, Double price) 
	{
		this.price = price;
		this.name = name;
		this.id = id;
	}

	public Double getPrice() 
	{
		return price;
	}
	
	public void setPrice(Double price) 
	{
		this.price = price;
	}
	
	public String getName() 
	{
		return name;
	}
	
	public void setName(String name)
	{
		this.name = name;
	}
	
	public String getId() 
	{
		return id;
	}
	
	public void setId(String id)
	{
		this.id = id;
	}

	@Override
	public boolean equals(Object obj) 
	{
		if (this == obj) {
			return true;
		}
		if (obj == null) {
			return false;
		}
		if (!(obj instanceof Product)) {
			return false;
		}
		Product other = (Product) obj;
		if (id == null) {
			if (other.id != null) {
				return false;
			}
		} else if (!id.equals(other.id)) {
			return false;
		}
		if (name == null) {
			if (other.name != null) {
				return false;
			}
		} else if (!name.equals(other.name)) {
			return false;
		}
		return true;
	}

	@Override
	public String toString() {
		return "Product [price=" + price + ", name=" + name + ", id=" + id + "]";
	}
}